<?php
$store = Mage::app()->getStore();
$code  = $store->getCode();
    $_enable = Mage::getStoreConfig('porto_settings/contacts/enable', $code);
    if($_enable){
        $_address = Mage::getStoreConfig('porto_settings/contacts/address', $code);
        $_zoom = Mage::getStoreConfig('porto_settings/contacts/zoom', $code);
        $_center_lat = Mage::getStoreConfig('porto_settings/contacts/latitude', $code);
        $_center_lng = Mage::getStoreConfig('porto_settings/contacts/longitude', $code);
?>
<script type="text/javascript" src="//maps.googleapis.com/maps/api/js?v=3.17"></script>
<script type="text/javascript">
    function initialize() {
        var pos = new google.maps.LatLng(<?php echo $_center_lat; ?>, <?php echo $_center_lng; ?>);
        var mapOptions = {
            center: pos,
            panControl: true,
            zoomControl: true,
            mapTypeControl: true,
            scaleControl: true,
            streetViewControl: true,
            overviewMapControl: true,
            zoom: <?php echo $_zoom; ?>
        };
        var map = new google.maps.Map(document.getElementById("store_map"), mapOptions);
        var marker = new google.maps.Marker({
            position: pos,
            map: map,
            title: '<?php echo $_address; ?>'
        });
    }
    google.maps.event.addDomListener(window, 'load', initialize);
</script>
<?php
    if(Mage::getStoreConfig("porto_settings/header/type",$code) == "10"){
?>
<div class="page-header">&nbsp;</div>
<?php
    }
?>
<div id="store_map" style="min-height: 300px; width: 100%;"></div>

<?php
    }
?>